import React, { Component } from 'react';
import {Tabs}from 'element-react';
import Single from './single';
import BulkImport from './bulkimport';
import {connect}from 'react-redux';
import styles from './address.less';

export class Address extends Component{
    constructor() {
        super(props);

    }
    render(){
        let a={...this.props.single, b: 1};
		console.log('>>>>>>>>>>>>>', this.props.single);
		console.log('>>>>>>>>>>>>>', a);
        return (
            <div className='tab-div'>
                <Tabs activeName="1" onTabClick={ (tab) => console.log(tab.props.name) }>
                 <Tabs.Pane  label={<div className='tab-label'>单个添加</div>} name="1"><Single/></Tabs.Pane> 
                <Tabs.Pane label={<div className='tab-label'>批量导入</div>} name="2"><BulkImport/></Tabs.Pane>
            </Tabs>
            </div>
            
)

    }
}
const mapStateToProps=(state)=>{
    console.log('!!!!!!!!!!!!',state);
	return {
		single:state.addresssingle,
        import:state.addressimport

	}
}

export default connect(mapStateToProps)(Address);
//
